package com.turing.model.caller.client.task.manager;

import com.turing.common.response.ResponseVO;
import com.turing.model.caller.client.BaseClient;
import com.turing.model.caller.vo.in.AnalysisResultVo;
import com.turing.model.caller.vo.in.FileTaskVo;
import com.turing.model.caller.vo.in.OcrPageTask;
import com.turing.model.caller.vo.in.OcrResultVo;
import com.turing.model.caller.vo.out.ForecastVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

@FeignClient( name = "ocr-dispatcher")
public interface OcrClient extends BaseClient {

    @Override
    @PostMapping("ocrPageTask/unLockOcrPageTask")
    ResponseVO<Object> unLockOcrPageTask(@RequestParam("ocrPageTaskSn") String ocrPageTaskSn);

    @Override
    @PostMapping("ocrPageTask/getAndLockOcrPageTask")
    ResponseVO<OcrPageTask> getAndLockOcrPageTask(@RequestParam("domain") String domain);

    @Override
    @PostMapping("ocrPageTask/ocrResultCallback")
    public ResponseVO<Object> ocrResultCallback(@RequestBody OcrResultVo ocrResultVo);

    @Override
    @PostMapping("fileTask/getAndLockAnalysisTask")
    ResponseVO<FileTaskVo> getAndLockAnalysisTask(@RequestParam("domain") String domain);

    @Override
    @PostMapping("fileTask/unLockAnalysisTask")
    ResponseVO<Object> unLockAnalysisTask(@RequestParam("taskSn") String taskSn);

    @Override
    @PostMapping("fileTask/analysisCallback")
    ResponseVO<Object> analysisCallback(@RequestBody AnalysisResultVo analysisResultVo);

}
